package com.changcheng.project.yuminsi.enums;

/**
 * @author yuminsi
 * @description
 * @date 2020/9/17 9:57
 * @since
 */
public enum  EtcStatus {
    /**
     *预开户
     */
    STATUS_1("1","已预开户"),
    /**
     *已签约
     */
    STATUS_2("2","确认签约"),
    /**
     *ETC申请-审核中
     */
    STATUS_3("3","账号申请订单审核中"),
    /**
     *ETC申请-取消中
     */
    STATUS_4("4","帐号申请订单取消中"),
    /**
     *ETC已取消
     */
    STATUS_5("5","帐号申请订单已取消"),
    /**
     *ETC申请-审核不通过
     */
    STATUS_6("6","账号申请订单审核不通过"),
    /**
     *ETC申请-审核通过
     */
    STATUS_7("7","账号申请订单审核通过"),
    /**
     *已注销-已解约
     */
    STATUS_8("8","账号已取消"),
    /**
     *已注销-未解约
     */
    STATUS_9("9","obu已激活"),
    /**
     *已激活
     */
    STATUS_10("10","ETC账户已暂停"),
    /**
     *已暂停
     */
    STATUS_11("11","etc黑名单"),
    /**
     *黑名单
     */
    STATUS_12("12","已注销");


    private String code;
    private String name;

    EtcStatus() {
    }

    EtcStatus(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }

    public static EtcStatus getEtcStatus(String code){
        for (EtcStatus type : values()){
            if (type.getCode().equals(code)){
                return type;
            }
        }
        return null;
    }

}
